import request from '@/utils/request'
import requestMy from '@/utils/requestMy'
export function login(data) {
  return requestMy({
    url: '/admins/login',
    method: 'post',
    data
  })
}

export function getInfo(state) {
  return requestMy({
    url: '/admins/' + state.id,
    method: 'get',
    params: { access_token: state.token }
  })
}

export function logout() {
  return request({
    url: '/user/logout',
    method: 'post'
  })
}
